#ifndef COMMAND_ARGS_H
#define COMMAND_ARGS_H

#include <string>
#include <vector>

#include "Conversions.h"

class CommandArgs
{
public:
    CommandArgs();
    CommandArgs(int argc, char* args[]);

    std::string argAt(size_t index) const;

    template<typename T>
    bool argAt(size_t index, T& t)
    {
        std::string arg = argAt(index);
        if(!arg.empty())
        {
            return Conversions::fromString<T>(t, arg);
        }
        return false;
    }
private:
    std::vector<std::string> args;
};

std::string quotify(const std::string& arg);
std::wstring quotify(const std::wstring& arg);

#endif